package org.lee.app.mediator;

/**
 * DefaultSqlSessionFactory
 *
 * @author dralee
 * @date 2021-11-23 15:22:24
 **/
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private final Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration.connection, configuration.mapperElement);
    }
}
